package com.health.userbackstage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.PageInfo;
import com.health.userbackstage.pojo.Order;
import com.health.userbackstage.pojo.OrderSetting;
import com.health.userbackstage.pojo.PageOrder;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import javax.lang.model.element.NestingKind;
import java.util.Date;
import java.util.List;

/**
 * @Author ASUS
 * @Date 2023/8/18 21:18
 * @Version 1.0
 */
public interface OrderMapper extends BaseMapper<Order> {

    Order findById(Integer id);

    List<Order> findPage(Integer currentPage, Integer pageSize, String queryString, String queryDate);

    int findCount( String queryString, String queryDate);

    void delBySetMealId(Integer id);

    int add(Order order);

    int getCountByDate(Date orderDate);

    int edit(Order order);

    Order findOrderById(Integer id);

    void del(Integer id);

    @Delete("delete from `order` where id = #{id}")
    int deleteById1(Integer id);
}
